
package cl.precidenciales.bd;
import com.mysql.jdbc.jdbc2.optional.MysqlDataSource;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class Conexion {
    
    private  static MysqlDataSource mysql;
    
    
    
    public static Connection conexion;
    
    public static Statement sentencia;
    
    public static ResultSet tablaresultado;
    
    
    
 
    public static void conexionEspecifica(String server,String bd,String user,String pass) throws SQLException{
       
        
        mysql = new MysqlDataSource();
        mysql.setServerName(server);
        mysql.setDatabaseName(bd);
        mysql.setUser(user);
        mysql.setPassword(pass);
        
        conexion = mysql.getConnection();
    }
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
}
